			<!-- password checker and strength indicator start -->
			<script type='text/javascript'>
			$(document).ready(function(){
				
				// check old password
				if ($("#user_oldPassword").length>0)
				{				
					$("#user_oldPassword").blur(function() {
						var params = {};
						params['password']=$("#user_oldPassword").val();
						if (params['password'].length>0)
						{					
							 var myAjax = new jQuery.post("{{ path('hr_online_user_check_password') }}", params, function(responseText) {
								jQuery('#check_old_pass_result').html(responseText);
							 });
						 }
					});
				} 
				
				// calculate the strength of the new password
				var strengthBarDummy = '<span id="password_strength_bar"><div id="password_strength0"></div><div id="password_strength1"></div><div id="password_strength2"></div><div id="password_strength3"></div><div id="password_strength4"></div><div id="password_strength5"></div><div id="password_strength6"></div><div id="password_strength7"></div><div id="password_strength8"></div><div id="password_strength9"></div></span>';
				jQuery('#strength').html(strengthBarDummy);

				$("#user_password").change(function() {
				var params = {};
				params['password']=$("#user_password").val();
				params['email']=$("#user_email").val();
					 var myAjax = new jQuery.post("{{ path('hr_online_calculate_password_strength') }}", params, function(responseText) {
						jQuery('#strength').html(responseText);
					 });	
				});			

				// check if the password is correctly repeated
				$("#user_repeatPassword").change(function() {
					if ($("#user_password").val()!=$("#user_repeatPassword").val())
					{
						jQuery('#confirm_check').html('<small class="error">Passwords do not match!</small>');
					} else {
						jQuery('#confirm_check').html('');
					}
				});			


			});
			</script>
